import { createApp } from 'vue'
import pinia from './stores'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
import './styles/index.scss'
import ElSvg from './components/SvgIcon/ElSvg';
import CategorySelector from '@/components/CategorySelector/index.vue'
import './permission'

const app = createApp(App)

app.component('CategorySelector', CategorySelector); 
ElSvg(app)

app.use(pinia)
  .use(router)
  .use(ElementPlus, {
    locale: zhCn,
  })
  .mount('#app')



// //测试接口 login
//   import  userApi from "@/api/userInfo";
// import { setToken } from './utils/token-utils'
//   async function fn (){
//     let result=await userApi.login({ username:"admin",password:"111111"});
//     // console.log(result);
//     //在这里把token 存到localstoage中
//     setToken(result.token)
   
//   };
//   fn();

//   //测试info
//   async function fn1 (){
//     let res=await userApi.info();

//     console.log(res)
//   };
//   fn1();